Keir Fraser [Thu, 17 Jan 2008 15:18:38 +0000 (15:18 +0000)]
tools: disable lomount and miniterm by default
lomount is a tool which reads and parses a partition table in a disk
image block device and then uses mount -o ...offset=... to mount it.
This is not an ideal approach. For example, if the intended
filesystem has corrupted metadata the kernel's filesystem driver may
start to write outside of the intended region. This might even be
exploitable in some perverse circumstances.
Nowadays people wanting to do this should use kpartx, which uses
devmapper to create appropriate range mappings. So lomount should be
disabled.
miniterm may well be useful but it is a clone-and-hack of an upstream
project and is currently built but not installed by default, partly
because it doesn't make sense to install on the dom0 which it might be
trying to debug.
It is probably useful to retain these two programs in the source tree
but IMO they should no longer be built by default.
The attached patch does these things:
* CONFIG_LOMOUNT and CONFIG_MINITERM in Config.mk
can enable and disable these programs
* They are disabled by default
* If CONFIG_MINITERM=y it is still built but not installed.
make -C tools/misc/miniterm install will install it.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Keir Fraser [Thu, 17 Jan 2008 15:17:22 +0000 (15:17 +0000)]
tools: LDFLAGS in link lines
LDFLAGS is not honoured by a couple of link lines in tools/*, but
should be.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Keir Fraser [Thu, 17 Jan 2008 15:14:17 +0000 (15:14 +0000)]
network scripts: SUSE has sensible use of ifup nowadays
While wading through the patches made to Xen by OpenSUSE in their
[s]rpm, I found that they have removed various special casing for ifup
on ther distribution.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Keir Fraser [Thu, 17 Jan 2008 15:13:40 +0000 (15:13 +0000)]
tools/docs: Fix example and default IP addresses.
In various places in documentation and code, IP addresses are provided
as examples, defaults, or dummy configuration. In general the
specific IP addresses used in Xen are not always appropriate. (For
example, 1.2.3.4 is used in a few places!)
The following addresses should be used:
* For examples and documentation, 192.0.2.0/24. (See RFC3330.)
* For defaults for private networks, a random network from RFC1918.
I have randomly selected 172.30.206.0/24 for this purpose and
documented this in at the only registry I know of,
www.ucam.org/cam-grin. This network should henceforth be used for
default configurations of local bridges, test networks, etc. in
Xen tools.
The following addresses should NOT be used:
* 10.0.*.*, 10.1.*.*, 192.168.0.*, 192.168.1.*, etc. Using these
addresses gives greatly increased likelihood of collision, as
ignorant network administrators and reckless middlebox vendors
often pick networks from the bottom of 10/8 and 192.168/16.
* 169.254.*.*. These are reserved for zeroconf (ad-hoc networking)
and should not be used for Xen private networks, bridges, etc.,
etc. Use of these addresses by Xen scripts causes trouble on hosts
(eg laptops) which find themselves in ad-hoc networking
environments. I think this is not hypothetical (!) since at least
one Linux distribution have specific code to detect this case and
cause Xen startup to fail iff the host already has an external
zeroconf address.
* 1.2.3.4. WTF !?
I have also used 127.0.255.255 in one place where apparently a dummy
address is needed (some Linux kernels won't accept a lack of an NFS
server address). If 127.0.255.255 is mistakenly used it is unlikely
to do any damage to real traffic even if it does escape into the
network at large.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Keir Fraser [Thu, 17 Jan 2008 15:11:22 +0000 (15:11 +0000)]
libxen: Avoid declarations-after-statement (C++ coding style).
Signed-off-by: Andre Przywara <andre.przywara@amd.com>
libxen: Use build-system CFLAGS and LDFLAGS.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Thu, 17 Jan 2008 15:06:30 +0000 (15:06 +0000)]
minios: add realloc
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Signed-off-by: Tim Deegan <tim.deegan@eu.citrix.com>
Keir Fraser [Thu, 17 Jan 2008 14:41:44 +0000 (14:41 +0000)]
minios: make stack size configurable
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Signed-off-by: Grzegorz Milos <gm281@cam.ac.uk>
Keir Fraser [Thu, 17 Jan 2008 14:41:12 +0000 (14:41 +0000)]
minios: add wait_event_deadline
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Signed-off-by: Tim Deegan <tim.deegan@eu.citrix.com>
Keir Fraser [Thu, 17 Jan 2008 14:40:55 +0000 (14:40 +0000)]
minios: add trydown
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Keir Fraser [Thu, 17 Jan 2008 14:40:23 +0000 (14:40 +0000)]
minios: use ASSERT for BUG_ON
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Keir Fraser [Thu, 17 Jan 2008 14:40:06 +0000 (14:40 +0000)]
minios: Add exit_thread prototype. Make sure exit_thread doesn't
return by accident.
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Keir Fraser [Thu, 17 Jan 2008 14:39:45 +0000 (14:39 +0000)]
minios: Add noreturn attribute to do_exit
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Keir Fraser [Thu, 17 Jan 2008 14:39:21 +0000 (14:39 +0000)]
minios: Optimize IA64's get_current()
Let gcc access r13 itself, leading to better code
Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com>
Keir Fraser [Thu, 17 Jan 2008 13:03:22 +0000 (13:03 +0000)]
Update API changelog for new feature flags.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Thu, 17 Jan 2008 12:59:10 +0000 (12:59 +0000)]
hvm: Allocate an unmapped guard page to separate ordinary low RAM
from special pages (ioreq, xenstore, etc). This will stop some probe
functions (e.g., embedded in memtest) from stomping on the special
pages.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Wed, 16 Jan 2008 15:55:57 +0000 (15:55 +0000)]
amd hvm (svm): Print warning if NPT constraints on PAE are hit.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Wed, 16 Jan 2008 13:44:18 +0000 (13:44 +0000)]
xenconsoled: Make slave pty raw during initialization.
(This avoids echo).
Signed-off-by: Tristan Gingold <tgingold@free.fr>
Keir Fraser [Wed, 16 Jan 2008 13:27:59 +0000 (13:27 +0000)]
x86: New feature flag XENFEAT_mmu_pt_update_preserve_ad.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Wed, 16 Jan 2008 11:44:41 +0000 (11:44 +0000)]
x86: Reserve a CPUID feature bit to advertise new
MMU_PT_UPDATE_PRESERVE_AD hypercall command.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Tue, 15 Jan 2008 21:23:37 +0000 (21:23 +0000)]
x86: Document the new MMU_PT_UPDATE_PRESERVE_AD hypercall.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Tue, 15 Jan 2008 18:50:44 +0000 (18:50 +0000)]
-DNDEBUG for hypervisor only
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Keir Fraser [Tue, 15 Jan 2008 18:48:32 +0000 (18:48 +0000)]
libxen: Fix function prototype.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Keir Fraser [Tue, 15 Jan 2008 14:39:23 +0000 (14:39 +0000)]
Merge with ia64 tree.
Keir Fraser [Tue, 15 Jan 2008 14:32:15 +0000 (14:32 +0000)]
x86: Allow batched mmu updates which preserve accessed/dirty pte bits.
Signed-off-by: Bruce Rogers <brogers@novell.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Tue, 15 Jan 2008 14:27:15 +0000 (14:27 +0000)]
Update version to 3.3-unstable.
Keir Fraser [Tue, 15 Jan 2008 14:24:05 +0000 (14:24 +0000)]
xend: Remove hardcoded (and apparently unused) xend version.
Signed-off-by: Jim Fehlig <jfehlig@novell.com>
Keir Fraser [Tue, 15 Jan 2008 14:22:50 +0000 (14:22 +0000)]
hvm, x86: Add QEMU BIOS menu for choosing boot device.
The attached patch implements a mini BIOS menu for choosing a
non-default
boot device. When a guest starts it'll display
'Press F10 to select boot device'
And wait 3 seconds, before continuing with the normal boot device. If
they press the F10 key, a menu is shown allowing a choice between
floppy, harddisk, cdrom and network (PXE).
I can't take credit for this originally - Jeremy Katz wrote it for
KVM, I merely re-diffed the patch to work against Xen's QEMU/BIOS code
tree. It has been tested in Fedora successfully against 3.1.x and 3.2.x
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
CC: Jeremy Katz <katzj@redhat.com>
If more than one boot device has been selected, the currently selected
number displayed in the menu is wrong.
Signed-off-by: Stefano Stabellini <stefano.stabellini@citrix.com>
Keir Fraser [Tue, 15 Jan 2008 14:17:22 +0000 (14:17 +0000)]
blktap: factor out linux specific code
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Alex Williamson [Tue, 15 Jan 2008 14:07:01 +0000 (07:07 -0700)]
[IA64] Fix security vulnerability
DomU can map any other domain's memory.
Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
Keir Fraser [Tue, 15 Jan 2008 11:29:15 +0000 (11:29 +0000)]
x86: INT3 and INTO trap gates should have DPL==3.
This was broken by c/s 16667 (gdbstub changes).
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Sun, 13 Jan 2008 10:50:18 +0000 (10:50 +0000)]
Added tag 3.2.0-rc6 for changeset
9facc624a238
Keir Fraser [Sun, 13 Jan 2008 10:50:13 +0000 (10:50 +0000)]
Update version to xen-3.2.0-rc6
Keir Fraser [Sat, 12 Jan 2008 11:26:04 +0000 (11:26 +0000)]
x86: Fix PV PIT handler after previous changeset.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Sat, 12 Jan 2008 11:13:57 +0000 (11:13 +0000)]
hvm: Improve in-Xen PIO emulation to better handle string PIO
instructions.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Sat, 12 Jan 2008 09:29:38 +0000 (09:29 +0000)]
svm: Properly mask unsupported bits in CPUID_80000001_ECX.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Fri, 11 Jan 2008 11:01:36 +0000 (11:01 +0000)]
hvm: hpet: Tidy up hpet_to_ns_limit calculation.
Suggested by Haitao Shan @ Intel.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Fri, 11 Jan 2008 10:59:48 +0000 (10:59 +0000)]
vmxassist: Emulate CLTS.
Signed-off-by: Kamala Narasimhan <kamala.narasimhan@citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Fri, 11 Jan 2008 10:53:44 +0000 (10:53 +0000)]
x86 hvm: hvm_maybe_deassert_evtchn_irq() needs to be called early in
vmexit handling, before IO-APIC can be EOIed or unmasked and resample
the fake INTx line.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Thu, 10 Jan 2008 22:53:43 +0000 (22:53 +0000)]
x86_emulate: Fix near CALL/JMP <reg,mem>. Broken by c/s 16491.
Thanks to AMD for narrowing this one down.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Thu, 10 Jan 2008 22:52:40 +0000 (22:52 +0000)]
x86_emulate: Certain opcodes are only valid with a memory operand.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Thu, 10 Jan 2008 15:30:46 +0000 (15:30 +0000)]
Fix network-bridge shell quoting.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Keir Fraser [Wed, 9 Jan 2008 22:21:58 +0000 (22:21 +0000)]
Keir Fraser [Wed, 9 Jan 2008 22:21:49 +0000 (22:21 +0000)]
Update version to 3.2.0-rc5
Keir Fraser [Wed, 9 Jan 2008 22:21:28 +0000 (22:21 +0000)]
x86_emulate: Fix handling of RIP-relative addressing.
The handling of SHLD/SHRD introduced in 16696:
b5b3e27f1af3f7 was
incorrect; thanks to Gary Grebus @ Virtual Iron for spotting it.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Wed, 9 Jan 2008 10:35:52 +0000 (10:35 +0000)]
vt-d: Fix print_vtd_entries walk VTd mapping table.
DMA request to above guest physical memory will cause VTd fault, in
which print_vtd_entries() tries to walk VTd mapping table. However,
during walking, current Xen code didn't check if the PTE is valid and
may access to invalid memory address.
Signed-off-by: Xiaowei Yang <xiaowei.yang@intel.com>
Keir Fraser [Wed, 9 Jan 2008 10:32:13 +0000 (10:32 +0000)]
hvm: hpet: Clamp period to sane values to prevent excessive looping in
hpet_timer_fn(), or excessive numbers of set_timer() callbacks.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Wed, 9 Jan 2008 10:11:31 +0000 (10:11 +0000)]
x86_emulate: Correct RIP-relative addressing offset for SHLD/SHRD with
immediate byte third operand.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Wed, 9 Jan 2008 10:09:04 +0000 (10:09 +0000)]
Fix x86_emulate() handling of imul with immediate operands.
This fixes a repeatable crash in RHEL 4.2 ext2 filesystem during boot.
Signed-off-by: Gary Grebus <ggrebus@virtualiron.com>
Signed-off-by: Ben Guthro <bguthro@virtualiron.com>
Keir Fraser [Tue, 8 Jan 2008 16:45:08 +0000 (16:45 +0000)]
x86: Fix a comment in get_page_type().
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Tue, 8 Jan 2008 16:20:04 +0000 (16:20 +0000)]
hvm: hpet: Fix overflow when converting to nanoseconds.
Currently in hpet_tick_to_ns, the approach is multiplying first, which
easily causes overflow when tick is quite large. The patch cannot
handle arbitratry large ticks duo to the precision requirement and
64bit's value range. But by optimize the equation, a larger ticks than
current code can be supported. Also an overflow check is added before
the calculation.
From: Haitao Shan <haitao.shan@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Tue, 8 Jan 2008 15:55:29 +0000 (15:55 +0000)]
hvm: Fix evtchn-to-fake-pci interrupt propagation.
Previously the evtchn_upcall_pending flag would only ever be sampled
on VCPU0, possibly leading to long delays in deasserting the
fake-pci-device INTx line if the interrupt is actually delivered to
other than VCPU0.
Diagnosed by Ian Jackson <ian.jackson@eu.citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Tue, 8 Jan 2008 14:35:18 +0000 (14:35 +0000)]
Add a ChangeLog file
Add a file for tracking API/ABI changes and additions.
Signed-off-by: John Levon <john.levon@sun.com>
Keir Fraser [Tue, 8 Jan 2008 14:31:23 +0000 (14:31 +0000)]
hvm: time: Fixes to 'SYNC' (no_missed_ticks_pending) timer handling.
Based on a patch by Dave Winchell <dwinchell@virtualiron.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Tue, 8 Jan 2008 13:57:45 +0000 (13:57 +0000)]
hvm: hpet: Fix per-timer enable/disable.
The enable/disable per timer interrupt bit is wrongly used as per
timer enable/disable. According to spec, comparator value should
constantly increasing when HPET is globally enabled, no matter
whether the timer interrupt is enabled or not.
From: Haitao Shan <haitao.shan@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Tue, 8 Jan 2008 10:13:11 +0000 (10:13 +0000)]
x86: Fixes for S3 suspend resume:
- Fix wallclock resume by remembering the offset from CMOS time to
UTC time
- Restore dom0's CPU affinity (lost during
continue_hypercall_on_cpu())
Signed-off-by: Xu Dongxiao <dongxiao.xu@intel.com>
Keir Fraser [Tue, 8 Jan 2008 09:57:59 +0000 (09:57 +0000)]
x86, hvm: Add a perf counter for CR0.WP=0 emulation.
Signed-off-by Kevin Tian <kevin.tian@intel.com>
Keir Fraser [Tue, 8 Jan 2008 09:54:06 +0000 (09:54 +0000)]
[Xend] Fix 2 problems related to SR class
This fixes two problems related to the SR class:
- get_PBDs() was not implemented
- get_physical_size did not work
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
Keir Fraser [Tue, 8 Jan 2008 09:45:58 +0000 (09:45 +0000)]
Merge with ia64 tree
Keir Fraser [Tue, 8 Jan 2008 09:43:44 +0000 (09:43 +0000)]
Handle netdev secondary addresses and labels
Fix the network-bridge logic to correctly transfer secondary IP
address from $netdev to $bridge.
e.g. if you add an secondary address/label/alias with:
$> ip addr add 172.31.0.200/24 dev eth0 label eth0:00
then, "ip addr show dev eth0" gives e.g.:
inet 172.31.0.10/24 brd 172.31.0.255 scope global eth0
inet 172.31.0.200/24 scope global secondary eth0:00
and transfer_addrs() tries to execute:
ip addr add 172.31.0.10/24 brd 172.31.0.255 scope global dev tmpbridge
ip addr add 172.31.0.200/24 scope global secondary dev tmpbridge:00
which causes the sript to fail because:
1) The device tmpbridge:00 doesn't exist
2) The "secondary" flag isn't valid
This patch fixes the sed commands to instead give:
ip addr add 172.31.0.10/24 brd 172.31.0.255 scope global dev tmpbridge label tmpbridge
ip addr add 172.31.0.200/24 scope global dev tmpbridge label tmpbridge:00
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Keir Fraser [Tue, 8 Jan 2008 09:40:33 +0000 (09:40 +0000)]
HVM vif without bridge.
When using xen without a bridge but NAT or routing, HVM domains can't
boot, and qemu-dm-n.log contains:
config qemu network with xen bridge for tap0 xenbr0
bridge xenbr0 does not exist!
That's because the qemu-ifup script always tries to add the vif to
a default-named xenbr0 bridge. On the contrary, PV domains just work
fine with the same configuration file except HVM parameters.
Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com>
Alex Williamson [Sun, 30 Dec 2007 20:02:16 +0000 (13:02 -0700)]
[IA64] Sort out the XEN_IA64_OPTF_IDENT_MAP_REG[457] constants confusion
Currently the constants are used for two different purpose.
one is for the OPTF hypercall sub command.
another is bit flag for struct opt_feature::mask.
They are different spaces, split them out.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Alex Williamson [Sun, 30 Dec 2007 19:56:16 +0000 (12:56 -0700)]
[IA64] Fix PV break fault handler.
PV domain break fault handler calls C routine reflect_event() with psr.ic = 0.
It might cause unrecoverable tlb miss. set psr.ic=1 before calling it.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Alex Williamson [Sun, 30 Dec 2007 19:53:54 +0000 (12:53 -0700)]
[IA64] Fix XEN_DOMCTL_shadow_op. it should check copy_to_guest() return value.
Pointed out by Samuel Thibault.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Alex Williamson [Sun, 30 Dec 2007 19:50:09 +0000 (12:50 -0700)]
[IA64] fix vmx_switch_rr7(). uninitialized register r3 was used. initialize it.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Keir Fraser [Sat, 29 Dec 2007 17:57:47 +0000 (17:57 +0000)]
Keir Fraser [Sat, 29 Dec 2007 17:57:37 +0000 (17:57 +0000)]
Update version to 3.2.0-rc4
Keir Fraser [Sat, 29 Dec 2007 17:55:47 +0000 (17:55 +0000)]
vmx: Fix the 2nd argument of cpuid_count() in vmx_cpuid_intercept()
For input 0x00000004, the value of "*ecx" has been overwritten by the
cpuid() in hvm_cpuid(), causing a bad value passed to cpuid_count().
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Keir Fraser [Sat, 29 Dec 2007 17:52:34 +0000 (17:52 +0000)]
vtpm: Fix GetCapabilityOwner function
GetCapabilityOwner function's behavior is different from that of a
real tpm device. By the difference, a TPM Manager in an HVM domain
could not detect whether TPM device has an owner or not.
Signed-off-by: Kouichi YASAKI <yasaki.kouichi@jp.fujitsu.com>
Keir Fraser [Fri, 28 Dec 2007 15:44:51 +0000 (15:44 +0000)]
Rename uintN_t guest handles to uintN, to avoid nameclash with uintN_t
macros during the handle definitions.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Fri, 28 Dec 2007 15:27:53 +0000 (15:27 +0000)]
xentrace bug fix: data format of hvmtrace is changed.
Signed-off-by: Disheng Su <disheng.su@intel.com>
Keir Fraser [Fri, 28 Dec 2007 15:26:27 +0000 (15:26 +0000)]
vt-d: Only setup rmrr identity mappings of the assigned devices
Current implementation setups identity mappings for all the rmrrs
whether the assigned device has rmrr or not. It's wasteful and not
necessary, because only USB controllers and UMA integarated graphics
devices have rmrr. This patch only setups rmrr identity mappings of
the assigned devices. If the assigned devices don't have rmrr, needn't
to setup rmrr identity mapping for guest.
BTW, this patch fixes the VT-d bug (Fail to boot smp Linux guest with
VT-d NIC assigned on IA32e platform).
Signed-off-by: Weidong Han <weidong.han@intel.com>
Keir Fraser [Fri, 28 Dec 2007 15:23:28 +0000 (15:23 +0000)]
In C99 (7.19.6.2.10), the behavior of scanf("stuff... %n", ..., &n) is
said to be undefined if the value to be put is n can't fit. I guess
we can safely consider that the same applies to printf.
Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com>
Keir Fraser [Thu, 27 Dec 2007 23:01:50 +0000 (23:01 +0000)]
hvm: copy_{to,from}_user_hvm shoudl return appropriate error codes.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Thu, 27 Dec 2007 13:00:40 +0000 (13:00 +0000)]
x86, hvm, rombios: INT13 LBA48 support for disks bigger than 128GB.
The new limit should be 2TB.
Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com>
Keir Fraser [Thu, 27 Dec 2007 12:56:32 +0000 (12:56 +0000)]
Fix pygrub handling of many kernels
If there are a large number of kernel images configured in grub.conf
there will be too many to fit in the limited size pygrub display. This
patch fixes this so that the list of kernels scrolls as needed.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Keir Fraser [Thu, 27 Dec 2007 12:53:57 +0000 (12:53 +0000)]
gdbstub: Various fixes.
Highlights:
- Removed panics and smp stop calls in favour of an smp pause
mechanism.
- Added x86_64 register mapping for gdb serial protocol support.
Signed-off-by: Dan Doucette <doucette.daniel@gmail.com>
Keir Fraser [Thu, 27 Dec 2007 12:30:44 +0000 (12:30 +0000)]
libxc: Fix xc_domain_bind_pt_irq().
Signed-off-by: Guy Zana <guy@neocleus.com>
Keir Fraser [Thu, 27 Dec 2007 12:28:58 +0000 (12:28 +0000)]
tapaio check return value from read()
In tools/blktap/drivers/tapaio.c there is a call to read(2) whose
return value is not checked. The attached patch attempts to do
something vaguely sensible in cases of error.
Fully comprehensive error handling in this area would be quite tough
to introduce now but at least with this change when things go wrong
you stand a chance of getting some information about what happened.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Keir Fraser [Thu, 27 Dec 2007 12:27:34 +0000 (12:27 +0000)]
Fix xend xenstore handling.
xend can get into a situation where two processes are attempting to
interact with the xenstore socket, with disastrous results. Fix the
two bad users of xstransact, add a big warning, and fix the destructor
so future mistakes will be detected earlier.
Signed-off-by: John Levon <john.levon@sun.com>
Keir Fraser [Thu, 27 Dec 2007 12:03:02 +0000 (12:03 +0000)]
vmx: Map the VLAPIC access page as mmio-direct in the p2m. This
prevents emulated accesses to this page, which would not be handled in
the correct way (VMX handles accesses to that page in non-root mode in
a very super-special way).
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Thu, 27 Dec 2007 12:00:30 +0000 (12:00 +0000)]
hvm: For functions which translate virtual addresses to machine
addresses, page faults should only be raised when the gva->gfn
translation fails. These should be distinguished from gfn->mfn
translation failures.
The main effect of this is to change the behaviour of functions
derived from __hvm_copy(), which now returns a three-way enumeration,
and also can automatically inject #PF when the gva->gfn translation
fails.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Thu, 27 Dec 2007 10:41:43 +0000 (10:41 +0000)]
hvm: Cannot use ring_3() macro on HVM guests. It does not work because
the CS field is not saved/restored and also because CS.RPL does not
always equal the DPL (e.g., when executing in real mode).
Instead we must interrogate SS.DPL, or CPL directly (SVM supports this).
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Thu, 27 Dec 2007 10:39:04 +0000 (10:39 +0000)]
hvm: Register fields CS,DS,ES,FS,GS,SS,etc. are all undefined during
HVM execution as they are not saved/restore on vmexit/vmentry. To
prevent accidental usage of these fields, poison them with 16-bit
value 0xbeef (debug builds only).
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Sat, 22 Dec 2007 10:27:26 +0000 (10:27 +0000)]
x86: Fix PAE build.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Sat, 22 Dec 2007 10:27:05 +0000 (10:27 +0000)]
Update version to 3.2.0-rc4-pre
Keir Fraser [Fri, 21 Dec 2007 21:59:50 +0000 (21:59 +0000)]
hvm: More physaddrs in unsigned longs.
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
Keir Fraser [Thu, 20 Dec 2007 17:30:27 +0000 (17:30 +0000)]
Keir Fraser [Thu, 20 Dec 2007 17:30:20 +0000 (17:30 +0000)]
Update version for 3.2.0-rc3
Keir Fraser [Thu, 20 Dec 2007 17:28:59 +0000 (17:28 +0000)]
Merge with ia64 tree
Keir Fraser [Thu, 20 Dec 2007 16:52:44 +0000 (16:52 +0000)]
[qemu-dm] Fix debugging output in tpm tis model
This fixes the debugging output.
Also I am tweaking on the code trying to establish a connection with
the external vTPM.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
Alex Williamson [Thu, 20 Dec 2007 16:40:33 +0000 (09:40 -0700)]
[IA64] Fix missing put_domain in XEN_DOMCTL_set_opt_feature
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
Keir Fraser [Thu, 20 Dec 2007 13:48:27 +0000 (13:48 +0000)]
Xend: don't check for device reuse if the device has no uname.
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
Keir Fraser [Thu, 20 Dec 2007 13:16:21 +0000 (13:16 +0000)]
Fix some build system error handling.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Keir Fraser [Thu, 20 Dec 2007 10:44:06 +0000 (10:44 +0000)]
linux: Force build failure if modules build fails
When building a linux kernel, if the modules build fails, then
the build carries on regardless.
The problem is simple - the "make modules" failure is not seen
by the calling make since its return value is not what is
returned.
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Keir Fraser [Thu, 20 Dec 2007 10:43:06 +0000 (10:43 +0000)]
hvm: Fix TPMD and QEMU connection
In HVM domain, MA_Transmit function in tcgbios sometimes become an
error (TCG_NO_RESPONSE). The cause of the error is not to make
connection of QEMU and TPMD instance within a timeout of MA_Transmit
function.
Before the MA_Transmit function was called, the attached patch
corrected so that connection of QEMU and TPMD might be completed.
Signed-off-by: Kouichi YASAKI <yasaki.kouichi@jp.fujitsu.com>
Keir Fraser [Thu, 20 Dec 2007 10:35:22 +0000 (10:35 +0000)]
ioemu: Do not close slave half of a pty.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Wed, 19 Dec 2007 15:56:10 +0000 (15:56 +0000)]
Keir Fraser [Wed, 19 Dec 2007 15:56:02 +0000 (15:56 +0000)]
Update version string for 3.2.0-rc2
Keir Fraser [Wed, 19 Dec 2007 15:53:56 +0000 (15:53 +0000)]
doc: Fix serial console command line.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Wed, 19 Dec 2007 15:51:01 +0000 (15:51 +0000)]
vmx: Do not set bit 1 of FEATURE_CONTROL MSR if SMX is not supported
by the CPU. Also generally beef up robustness of VMXON instruction.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>